/**
 * 获取中国法定假日及调休(2011-2024)
 * @param y int|string 公历年
 * @return object JSON {'Y-M-D':0|1} 0:假,1:班
 * 		返回未定义日期: 正常的工作日或周末
 * @添加数据  注意:天数最大8(>8分段定义)
	let rtn='', SRC={'m-d':[1|0?班:假,天数],...};
	Object.keys(SRC).forEach(k=>{
		let [m,d]=k.split('-');  rtn+=SRC[k][0];
		rtn+=$.pad($.radix(m,10,2),4)+$.pad($.radix(d,10,2),5);
		rtn += $.pad($.radix(SRC[k][1]-1,10,2), 3);
	});
	console.log($.radix(rtn,2,64));
 */
$.dateMeshWork = function(y){
	const T={}, DATA=[ // 64=>2进制  每13位->1:值(1?班:假)+4:月+5:日+3:额外天数
		'12e_0XQWWGQ9v68agIWxI3pu','12er0RQFHFv89Ku2THhBFGdt', // 2011,2012
		'Gg9I9Eb0a8g75DadLP1Cf9cis6UXGTfW','24Hq0$qa0XKKAgG5_acMU1GTfO',//2013,2014
		'12ea4dWKjBW8H52ZKITXGTfG','4AaO2FfE118daPAim9Uio2WxI2pw', // 2015,2016
		'24ni0xqY2WGGI9rLs2yMV1GUpo','8H9O4$Im25L42d0JgD19iizAWxdGpo', // 2017,2018
		'24I4H4n2gd0KBgK6EajMUXGTfW','48ZC1nn192AcWKCga6ohS6TXGVfG', // 2019,2020
		'8L8u4lIe23LCWePL0CnPa4pMT1GTf8','4AZqX$g211gc0JqgS66agIWxI2pw',//2021,2022
		'24Xhey92YbmJigO6ihP2U$Hopo','GYH09Nb848g75E0ePLOCXPS4lMUXGTfW',//2023,2024
		'128w0UUI0GYfi532$MU1GVfO',//2025
	];
	$.dateMeshWork = function(y){
		if(T[y]) return T[y];  if(!(y*=1)||y<2011||y>2024) return {};
		let rtn={}, B='', V=DATA[y-2011], i=0, L=V.length;
		for(; i<L; i++) B += $.pad($.s64.indexOf(V[i]).toString(2), 6);
		B=B.replace(/^0+/,'');  B=$.pad(B,Math.ceil(B.length/13)*13);
		for(let i=0,LEN=B.length; i<LEN; i+=13){
			let x=parseInt(B.slice(i,i+13),2), m=(x>>8)&15, d=(x>>3)&31;
			let o=$.date(y+'-'+m+'-'+d,'o')*1/1000, v=(x>>12)&1, mx=x&7;
			for(let n=0; n<=mx; n++) rtn[$.date(o+n*86400,'d')] = v;
		}
		return T[y] = rtn;
	};
	return $.dateMeshWork(y);
};
